package com.cskaoyan;


import com.cskaoyan.exception.CustomValidationException;
import com.cskaoyan.util.ValidationUtil;
import org.aopalliance.intercept.Joinpoint;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Before;
import org.springframework.validation.BindingResult;

/**
 * @author stone
 * @date 2021/11/25 10:10
 */
/*public class ValidationAspect {

//    @Before()
    public void before(JoinPoint joinpoint) throws CustomValidationException {
        Object[] args = joinpoint.getArgs();
        for (Object arg : args) {
            if (arg instanceof BindingResult) {
                //包含BIndingResult的handler方法
                ValidationUtil.valid2((BindingResult) arg);
            }
        }

    }
}*/
